import chalk, { Chalk } from "chalk";

console.log("\x1b[33m%s\x1b[0m", "your name1:");

console.log("\x1b[33m\x1b[4m%s\x1b[0m", "your name2:");

console.log("\x1b[2B%s\x1b[0m", "your name3:");

console.log("\x1b[2G%s\x1b[0m", "your name4:");

console.log(chalk.red("hello imooc" + " ! " + chalk.blue("hello imooc")));

console.log(chalk.red.bgGreen.bold("Hello World"));
console.log(chalk.red("Hello", "World"));
console.log(chalk.red("Hello", chalk.underline("World")));
console.log(chalk.rgb(255, 180, 0).underline("World"));
console.log(chalk.hex("#ff0000").bold("World"));
console.log(chalk.hex("#ff0000")("hello", "小玮"));
console.log(chalk.bold.hex("#00ff00")("hello", "小玮"));

const error = (...text) => console.log(chalk.bold.hex("#ff00ff")(text));

error("Error");

const customChalk = new Chalk({ level: 3 });
console.log(customChalk.yellow("Hello Im"));
console.log(customChalk.hex("#00ff00")("Hello Im"));
